Named & Optional


.NET Framework
Language Samples, Parameters
Desktop
en-US
11/28/2011

Named and Optional Parameters

C# 4.0 supports named and optional parameters. This program demonstrates how to declare a method with named and optional parameters, and how to call the method while making use of the default values for the parameters, and by explicit naming particular parameters.